<?php

class Customer
{
  public $name;

  public function __construct()
  {
    $this->name = 'Hari Om';
    $this->age = 21;
  }

  c
  public function __sleep() {
    echo "I am in sleep\n\n";
    return array('name'=>$this->name);
  }

  public function __wakeup() {
    echo "I am in wakeup\n\n";
  }
}


$c = new Customer();
$data = serialize($c)."<br>";

var_dump($data);
unserialize($data);

